<template>
  <el-dialog ref="dialogform" :title="`查看${title}文件`" :visible.sync="dialogVisible" width="50%" :before-close="handleClose">
    <el-table :data="filesList" border style="width: 100%">
      <el-table-column type="index" width="55" label="序号">
      </el-table-column>
      <el-table-column prop="fileName" label="文件名称">
      </el-table-column>
      <el-table-column prop="fileType" label="文件格式" width="150">
      </el-table-column>
      <el-table-column prop="version" label="版本号" width="150">
      </el-table-column>
      <el-table-column prop="versionName" label="版本号名称" width="150">
      </el-table-column>
    </el-table>
    <span slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
    </span>
  </el-dialog>
</template>
<script>

export default {
  components: {},
  props: {
    title:{
      type:String,
      default:()=>{
        return ''
      }
    },
    dialogVisible: {
      type: Boolean,
      default: () => {
        return false
      }
    },
    filesList: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  data () {
    return {}
  },
  computed: {

  },
  watch: {},
  computed: {},
  mounted () { },
  methods: {
    //取消关闭
    cancel () {
      this.$emit("closeDialog")
    },
    handleClose (done) {
      this.$confirm('确认关闭？')
        .then(_ => { this.cancel() })
        .catch(_ => { });
    }
  }
};
</script>
<style lang="scss" scoped>
.line {
  border-bottom: 1px solid #e6e6e6;
}

.icon {
  font-size: 20px;
  line-height: 29px;
  cursor: pointer;
}

::v-deep .noLabel {
  .el-form-item {
    .label {
      display: none;
    }

    .el-form-item__content {
      margin: 0;
    }
  }
}
</style>
